<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 函数表达式 必须先声明在调用
        // fn(2,3)     // 错误写法 Cannot access 'fn' before initialization
        let fn = function (x, y) {
            console.log(x + y)
        }
        // fn(2,3)


        //   具名函数的调用可以写到任何位置

        function fun(x, y) {
            console.log(x * y);
        }
        fun(3, 8)     
    </script>
</body>

</html>